const resFile = require('./response_file');
const path = require('path');

/**
 * response a error
 * @param {object} response
 * @param {string | number} type
 * @param {Function} callback
 */
function resError(response,type,callback){
  resFile({
    response:response,
    realPath:path.join(__dirname, '../../../../error_pages/'+type+'.html'),
    statusCode:type,
  },callback);
}

module.exports = resError;